home *** CD-ROM | disk | FTP | other *** search
- Path: cville-srv.wam.umd.edu!jsquires
- From: jsquires@wam.umd.edu (jeffrey d squires)
- Newsgroups: comp.lang.c
- Subject: Limit on #bytes inside of struct?
- Date: 9 Feb 1996 03:45:49 GMT
- Organization: University of Maryland College Park
- Message-ID: <4feg1d$d4g@cville-srv.wam.umd.edu>
- NNTP-Posting-Host: rac6.wam.umd.edu
- X-Newsreader: TIN [version 1.2 PL0]
-
- I have the following:
-
- typedef struct {
- int zero;
- int one;
- int two;
- int three;
- int four;
- int five;
- int six;
- int seven_or_more;
- } hist_type;
-
- hist_type histogram;
- int num=2;
-
- histogram.zero = 0;
- histogram.one = 0;
- histogram.two = 0;
- histogram.three = 0;
- histogram.four = 0; /* at this point, value of num changes from 2 to 0!!!*/
-
- Is there a limit on the number of bytes allowed inside of a struct?
- I am positive that the value of num changes from 2 before the last
- assignment to 0 after it. Any ideas? Is this a bug in gcc? Unix?
-
- This is completely crazy!
-
- Thanks in advance for your response,
-
- Jeff Squires
- jsquires@umiacs.umd.edu
-
-
-